import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
//阻塞队列
public class ThreadDemo13 {
    public static void main(String[] args) throws InterruptedException {
        BlockingQueue <String> blockingQueue =new LinkedBlockingQueue<>();
        //入队列
        blockingQueue.put("abc");
        System.out.println(blockingQueue);
        //出队列
        //如果没有put 直接take就会阻塞等待
        blockingQueue.take();
        System.out.println(blockingQueue);
    }
}
